home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / Xm / XmeToHorizontalPixels.z / XmeToHorizontalPixels
Text File  |  1998-10-30  |  7KB  |  133 lines

  1.  
  2.  
  3.  
  4.      XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss((((3333XXXX))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss - Converts from real-world dimensions
  10.           to pixels
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.           #include <Xm/XmP.h>
  14.           XXXXmmmmIIIImmmmppppoooorrrrttttOOOOppppeeeerrrraaaattttoooorrrr XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss(
  15.           WWWWiiiiddddggggeeeetttt wwwwiiiiddddggggeeeetttt,
  16.           iiiinnnntttt ooooffffffffsssseeeetttt,
  17.           XXXXttttAAAArrrrggggVVVVaaaallll ****vvvvaaaalllluuuueeee);
  18.  
  19.      VVVVEEEERRRRSSSSIIIIOOOONNNN
  20.           This page documents Motif 2.1.
  21.  
  22.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.           XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss converts a horizontal distance from a
  24.           real-world dimensional unit (such as thousandths of an inch)
  25.           to pixels.  This conversion is based on the horizontal
  26.           resolution of the screen.  The choice of real-world
  27.           dimensional unit is stored in the XXXXmmmmNNNNuuuunnnniiiittttTTTTyyyyppppeeeeresource.
  28.  
  29.           For example, suppose that _w_i_d_g_e_t has an XXXXmmmmNNNNuuuunnnniiiittttTTTTyyyyppppeeee resource
  30.           value of XXXXmmmm1111000000000000TTTTHHHH____IIIINNNNCCCCHHHHEEEESSSS. If the input _v_a_l_u_e were 2000
  31.           (meaning 2000/1000 inches or 2 inches), then
  32.           XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss determines how many horizontal pixels
  33.           fall within 2 inches. Because different screens have
  34.           different resolutions, the returned _v_a_l_u_e might be 160
  35.           pixels on one screen and 200 pixels on another.
  36.  
  37.           XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss is an XXXXmmmmIIIImmmmppppoooorrrrttttPPPPrrrroooocccc.
  38.  
  39.           Typically, your widget will call this function from a
  40.           synthetic resource record.
  41.  
  42.           _w_i_d_g_e_t    Specifies the widget containing the resource named
  43.                     by _o_f_f_s_e_t.
  44.  
  45.           _o_f_f_s_e_t    Specifies the offset (in bytes) of a synthetic
  46.                     resource field in the widget record.
  47.  
  48.           _v_a_l_u_e     Specifies a value in the XXXXmmmmNNNNuuuunnnniiiittttTTTTyyyyppppeeee real-world
  49.                     dimensional units used by _w_i_d_g_e_t and returns a
  50.                     value in pixels.
  51.  
  52.      RRRREEEETTTTUUUURRRRNNNN
  53.           Returns one of the following XXXXmmmmIIIImmmmppppoooorrrrttttOOOOppppeeeerrrraaaattttoooorrrr values:
  54.  
  55.           XXXXmmmmSSSSYYYYNNNNTTTTHHHHEEEETTTTIIIICCCC____NNNNOOOONNNNEEEE
  56.                     The caller of the XXXXmmmmIIIImmmmppppoooorrrrttttPPPPrrrroooocccc is not responsible
  57.                     for copying the converted _v_a_l_u_e into the resource
  58.                     specified by _o_f_f_s_e_t.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                         (printed 10/24/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss((((3333XXXX))))
  71.  
  72.  
  73.  
  74.           XXXXmmmmSSSSYYYYNNNNTTTTHHHHEEEETTTTIIIICCCC____LLLLOOOOAAAADDDD
  75.                     The caller of the XXXXmmmmIIIImmmmppppoooorrrrttttPPPPrrrroooocccc is responsible for
  76.                     copying the converted _v_a_l_u_e into the resource
  77.                     specified by _o_f_f_s_e_t.
  78.  
  79.           Motif's synthetic resource mechanism is typically the caller
  80.           of XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss.  Therefore, if
  81.           XXXXmmmmeeeeTTTTooooHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss returns XXXXmmmmSSSSYYYYTTTTHHHHEEEETTTTIIIICCCC____LLLLOOOOAAAADDDD, Motif
  82.           synthetic resource mechanism will take care of copying (and
  83.           casting) _v_a_l_u_e into the resource symbolized by _o_f_f_s_e_t.
  84.  
  85.      RRRREEEELLLLAAAATTTTEEEEDDDD
  86.           XXXXmmmmeeeeFFFFrrrroooommmmHHHHoooorrrriiiizzzzoooonnnnttttaaaallllPPPPiiiixxxxeeeellllssss(3), XXXXmmmmeeeeFFFFrrrroooommmmVVVVeeeerrrrttttiiiiccccaaaallllPPPPiiiixxxxeeeellllssss(3), and
  87.           XXXXmmmmeeeeTTTTooooVVVVeeeerrrrttttiiiiccccaaaallllPPPPiiiixxxxeeeellllssss(3).
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                         (printed 10/24/98)
  130.  
  131.  
  132.  
  133.